import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/buju',
      name: 'buju',
      component: () => import('../views/BujuRongQiView.vue'),
      children: [
        {
          path: '/index/xinwen',
          name: 'xinwen',
          component: () => import('../views/Index/XinWenView.vue'),
        }, {
          path: '/index/caijing',
          name: 'caijing',
          component: () => import('../views/Index/CaijingView.vue'),
        }, {
          path: '/index/jishu',
          name: 'jishu',
          component: () => import('../views/Index/NewTechView.vue'),
        }
      ]
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('../views/IndexView.vue'),


    },
    {
      path: '/caidan',
      name: 'caidan',
      component: () => import('../views/CaiDanView.vue'),
      children: [
        {
          path: '/AdminSettingView',
          name: 'AdminSettingView',
          component: () => import('../views/BasicData/AdminSettingView.vue'),
        }, {
          path: '/GridUserView',
          name: 'GridUserView',
          component: () => import('../views/BasicData/GridUserView.vue'),
        }, {
          path: '/GridTypeView',
          name: 'GridTypeView',
          component: () => import('../views/BasicData/GridTypeView.vue'),
        }, {
          path: '/LogView',
          name: 'LogView',
          component: () => import('../views/BasicData/LogView.vue'),
        }

      ]
    }, {
      path: '/lxlogin',
      name: 'lxlogin',
      component: () => import('../views/LXLoginView.vue'),
    },


    // {
    //   path: '/main',
    //   name: 'main',
    //   component: () => import('../views/MainView.vue'),
    //   children: [
    //     {
    //       path: '/AdminSettingView',
    //       name: 'AdminSettingView',
    //       component: () => import('../views/BasicData/AdminSettingView.vue'),
    //     }
    //   ]
    // },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
  ],
})

export default router
